<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="/xlive/script/xlv.js"></script>
</head>
<body>
	<div id="setOptions_main" xlvobject="xlv.obj.pane" xlvprop="{glow:{enable:true},border:{enable:true}}"
		xlvmethod="{
			styleFor:function(root){
				root.style.background='white';
			}
		}"
	>
	  					<div xlvobject="xlv.obj.dmTrigger"
							 xlvprop="{dmName:'options',listener:{when:'afterModelChanged',notify:'setChanged',memoType:'create',memoMethods:'set-options'}}"
							 xlvmethod="{
							 		process:function(options){
							 			var dm=this.getDataModel();
							 			if('true'!=dm.getValue('set-options.return.valid')){
							 				return alert('set Product error :'+dm.getValue('set-directory.return.why'));
							 			}
							 			var pxml=dm.getNode('set-options.pxml');
							 			var old=dm.getNode('list.return.data.pxml');
							 			old.parentNode.appendChild(pxml.cloneNode(true));
							 			old.parentNode.removeChild(old);
							 			
							 			var main=this.getParentById('setOptions_main');
	  									if('setProduct'== main.$P.callback){
	  										this.getDesktop().showPane('/xlive/rst/setProduct.html',null,null,{paneIn:'center',opacity:0.2,color:'gray'});
	  									}
	  									main.dispose();
									}
							 }"
						>
						</div>
	  
	  <div id="pxml" xlvobject="xlv.obj.pxmlWriter"  style="width:320px"
	    xlvprop="{
	    	completeString:'完成'
	    }"
	  	xlvmethod="{
	  		initial:function(){
	  			this.$self('initial');
	  			var dm = this.getDataModel('options');
	  			var node=dm.getNode('list.return.data.pxml');
	  			this.$V.pxmlNode=node.cloneNode(true);
	  			this.build(this.$V.pxmlNode);
	  		},
	  		complete:function(){
	  			var dm = this.getDataModel('options');
	  			var node=dm.getNode('list.return.data.pxml');
	  			if(this.$V.pxmlNode &amp;&amp; dm.xml_nodeToString(node)!=dm.xml_nodeToString(this.$V.pxmlNode)){
	  				var pxml=dm.getNode('set-options.pxml');
	  				pxml.parentNode.appendChild(this.$V.pxmlNode);
	  				pxml.parentNode.removeChild(pxml);
	  				this.$V.pxmlNode=null;
	  				dm.webMethod('set-options');
	  			}else {
	  				var main=this.getParentById('setOptions_main');
	  				if('setProduct'== main.$P.callback){
	  					this.getDesktop().showPane('/xlive/rst/setProduct.html',null,null,{paneIn:'center',opacity:0.2,color:'gray'});
	  				}
	  				main.dispose();
	  			}
	  		},
	  		cancel:function(){
	  			var main=this.getParentById('setOptions_main');
	  			if('setProduct'== main.$P.callback){
	  				this.getDesktop().showPane('/xlive/rst/setProduct.html',null,null,{paneIn:'center',opacity:0.2,color:'gray'});
	  			}
	  			main.dispose();
	  		},
	  		addSelectXml:function(gli){
	  			var s=this.$self('addSelectXml',gli);
	  			s.setAttribute('showValue','false');
	  			return s;
	  		}
	  		
	  	}"
	  >
	  </div>
	</div>
</body>
</html>
